import { createRouter, createWebHistory } from 'vue-router'
// createRouter 创建路由实例
// createWebHistory 路由模式 history
// createWebHashHistory 路由模式 hash
import HomeView from '../views/HomeView.vue'
import BigScreenView from '../views/BigScreenView.vue'
const router = createRouter({
  // 路由模式
  history: createWebHistory(import.meta.env.BASE_URL),
  // 路由规则表
  routes: [
    {
      path: '/',
      name: 'home',
      redirect: '/big-screen',
      component: HomeView
    }, {
      path: '/big-screen',
      component: BigScreenView,
      name: 'big-screen'
    }
  ]
})

export default router
